package com.wk1un2.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.wk1un2.entity.User;
import com.wk1un2.mapper.UserMapper;
import com.wk1un2.service.UserService;

/**
 * 业务接口的实现类
 * 
 * @author Administrator
 *
 */
@Service // 扫描
public class UserServiceImpl implements UserService {

	@Autowired
     UserMapper userMapper;// 自动注入mapper

	@Override
	public User getAll(String u_name, String u_password) {
		// TODO Auto-generated method stub
		System.out.println(u_name);
		System.out.println(u_password);

		return userMapper.getAll(u_name, u_password);// 获取所有用户 调用mapper
	}

	@Override
	public int add(Map<String, Object> m) {
		// TODO Auto-generated method stub
		return userMapper.add(m);
	}
	@Override
	public List<Map<String, Object>> getStatic(Integer u_id) {
		// TODO Auto-generated method stub
		return userMapper.getStatic(u_id);
	}

	@Override
	public Integer UpdateSafe(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return userMapper.UpdateSafe(map);
	}
}
